<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./vue.js"></script>
    <style>
        .box{
            width: 100px;
            height: 100px;
            background: red;
        }
    </style>
</head>
<body>
    <div id="app">
        <!-- <div class="box" v-show="judge" >我是div</div> -->
        <!-- <button @click="judge=!judge">点击</button> -->

        <div class="box" v-if="num==1" >11111</div>
        <div class="box" v-else-if="num==2">2222</div>
        <div v-else>
            num是其他值
        </div>
        <button @click="num++">点击</button>
    </div>
    <script>

        /* v-if 和 v-show的区别？ */
        new Vue({
            el:"#app",
            data:{
                judge:true,
                num:1
            }
        })
    </script>
</body>
</html>